/* Home Page Specific Styles */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    animation: slowZoom 20s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1332px;
    margin: 0 auto;
    padding: 100px 16px 60px;
    width: 100%;
}

.hero-text {
    max-width: 545px;
}

.hero-text h1 {
    font-size: 72px;
    font-weight: 700;
    line-height: 82px;
    margin-bottom: 20px;
    color: var(--text-on-colored);
}

.hero-text p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-on-colored);
}

/* Feature Section */
.feature-section {
    background: var(--light-bg);
    padding: 100px 16px;
}

.feature-header {
    margin-bottom: 50px;
}

.feature-header h2 {
    font-size: 40px;
    font-weight: 700;
    line-height: 50px;
    margin-bottom: 20px;
}

.feature-header p {
    font-size: 18px;
}

.feature-row {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

.feature-text {
    flex: 1;
    max-width: 625px;
}

.feature-text h3 {
    font-size: 40px;
    font-weight: 700;
    line-height: 50px;
    margin-bottom: 20px;
}

.feature-text p {
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 10px;
}

.feature-img {
    flex: 1;
    max-width: 625px;
    height: 500px;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Services/Partners Section */
.services-section {
    background: var(--light-bg);
    padding: 50px 16px 100px;
}

.services-header {
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 20px;
    margin-bottom: 50px;
}

.services-header p {
    padding-left: 50px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px;
    gap: 100px;
    margin-bottom: 0;
}

.service-item:nth-child(2) {
    background: var(--primary-color);
    color: var(--text-on-colored);
}

.service-item:nth-child(2) .cta-btn {
    background: var(--light-bg);
    color: var(--text-white);
}

.service-left {
    max-width: 300px;
}

.service-left h4 {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 20px;
}

.service-left h3 {
    font-size: 40px;
    font-weight: 700;
    line-height: 50px;
}

.service-right {
    max-width: 500px;
}

.service-right p {
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 35px;
}

/* Values Section */
.values-section {
    background: linear-gradient(270deg, rgba(127, 127, 127, 0.1) 0%, rgba(127, 127, 127, 0.1) 100%), var(--light-bg);
    padding: 80px 16px;
}

.values-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 150px;
    margin-bottom: 50px;
}

.values-header h2 {
    font-size: 40px;
    font-weight: 700;
    line-height: 50px;
}

.values-images {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.values-images img {
    width: 420px;
    height: 400px;
    object-fit: cover;
}

.value-cards {
    display: flex;
    gap: 20px;
}

.value-card {
    flex: 1;
    padding: 50px 30px;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.35) 100%),
    url('https://images.unsplash.com/photo-1497435334941-8c899ee9e8e9?w=800');
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.value-card h5 {
    font-size: 14px;
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 40px;
    font-weight: 700;
    line-height: 50px;
}

/* Slider Styles */
.pen {
    max-width: 900px;
    width: 100%;
    margin: 40px auto 0;
    position: relative;
}

.stage {
    width: 100%;
    height: 420px;
    overflow: hidden;
    white-space: nowrap;
    transition: all .25s ease-in-out;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.stage::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.element {
    display: inline-block;
    height: 100%;
    background-size: cover;
    background-position: center;
    margin-right: 8px;
    transition: all .25s ease-in-out;
    vertical-align: top;
    position: relative;
    width: 280px;
}

.element:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

.element.active {
    width: 420px;
}

.element.inactive {
    width: 200px;
    opacity: 0.5;
}

.element:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
}

.slide-caption {
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.4));
    color: var(--text-on-colored);
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.35;
    max-height: 60%;
    overflow: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slide-caption::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.slide-caption strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}

.slide-caption ul {
    margin: 0;
    padding-left: 18px;
}

.slide-caption li {
    margin-bottom: 6px;
}

/* Testimonials Section */
.testimonials-section {
    background: linear-gradient(270deg, rgba(127, 127, 127, 0.1) 0%, rgba(127, 127, 127, 0.1) 100%), var(--light-bg);
    padding: 80px 16px;
}

.testimonials-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 60px;
}

.testimonial-card {
    flex: 1;
    min-width: 300px;
    max-width: 420px;
    padding: 30px;
    background: rgba(127, 127, 127, 0.2);
    border-radius: 8px;
}

.testimonial-card i {
    font-size: 80px;
    color: var(--text-white);
}

.testimonial-card p {
    font-size: 18px;
    line-height: 28px;
    padding: 20px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.testimonial-author span {
    font-size: 20px;
    font-weight: 700;
}

/* FAQ/Accordion Section */
.accordion-section {
    width: 100%;
    background: var(--light-bg);
    color: var(--text-white);
    padding: 60px 0;
    font-family: 'DM Sans', sans-serif;
}

.accordion-item {
    background: transparent;
    border-radius: .4rem;
}

.accordion-item hr {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-trigger {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 18px 0;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-trigger:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

.accordion-trigger .flex {
    display: flex;
    align-items: center;
    gap: 18px;
}

.accordion-trigger h3 {
    font-size: 18px;
    margin: 0;
}

.accordion-trigger ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
}

.accordion-trigger li {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

.accordion-trigger i {
    color: var(--accent-color);
    padding: .5rem;
}

.accordion-trigger .ion-md-arrow-down {
    display: none;
}

.answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .2s ease;
}

.answer p {
    color: var(--text-white);
    padding: 0;
    margin: 0;
}

.accordion-item.open .answer {
    max-height: 400px;
    padding-top: 16px;
}

.accordion-item.open .ion-md-arrow-forward {
    display: none;
}

.accordion-item.open .ion-md-arrow-down {
    display: block;
}

/* Contact Section */

.contact-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
    padding: 60px 0;
    color: var(--text-white);
    font-family: var(--font-main);
}

.contact-section h2 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-white);
    font-size: 34px;
}

.contact-section .container {
    max-width: 1200px;
}

.contact-section .row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Make the two contact columns split the row on larger screens to avoid
   content-driven overlap (pieces or form expanding beyond available space). */
@media (min-width: 992px) {
    /* Reduce effective width to account for gap so two columns don't wrap */
    .contact-section .row > .col-lg-6 {
        flex: 0 0 calc(50% - 24px);
        max-width: calc(50% - 24px);
        box-sizing: border-box;
    }
}

.contact-section .col-md-10 {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contact-section .col-lg-7 {
    width: 66%;
    max-width: 760px;
    margin: 0 auto;
}

.contact-section .btn-primary {
    background: var(--button-gradient);
    border: none;
    color: var(--text-on-colored);
    padding: 10px 36px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    box-shadow: 0 10px 24px rgba(238, 94, 69, 0.35);
    transition: transform 0.3s, filter 0.3s;
}

.contact-section .btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.contact-section p, .contact-section label {
    color: rgba(0, 0, 0, 0.82);
    font-size: 1rem;
    line-height: 1.5;
}

.contact-section .mb-5 {
    margin-bottom: 2rem;
}

.contact-section .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "company company"
        "fname lname"
        "email phone"
        "message message";
    gap: 16px;
    align-items: start;
}

.contact-section .form-grid .field-fname { grid-area: fname; }
.contact-section .form-grid .field-lname { grid-area: lname; }
.contact-section .form-grid .field-email { grid-area: email; }
.contact-section .form-grid .field-phone { grid-area: phone; }
.contact-section .form-grid .field-company { grid-area: company; }
.contact-section .form-grid .field-message { grid-area: message; }

/* Puzzle & RTL adjustments */
/* Ensure puzzle is above other content so pointer events reach pieces if there's any overlap */
/* Make puzzle sit above other content so pointer events reach pieces if there's any overlap */
#puzzle {
    z-index: 1000;
    position: relative; /* reinforce positioning in case other rules change */
}
.piece {
    z-index: 1001;
}

/* Ensure puzzle container is properly isolated in all directions */
.puzzle-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* RTL-specific spacing and layout fixes */
html[dir="rtl"] .puzzle-container {
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Base RTL layout - maintain flex-wrap for mobile responsiveness */
html[dir="rtl"] .contact-section .row {
    flex-direction: row-reverse; /* Reverse column order in RTL */
    gap: 30px;
}

/* Ensure proper column spacing on larger screens in RTL */
@media (min-width: 992px) {
    html[dir="rtl"] .contact-section .row {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping to new line */
        justify-content: center;
        gap: 40px;
    }
    
    html[dir="rtl"] .contact-section .row > .col-lg-6 {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
        width: calc(50% - 20px);
    }
}

/* For medium screens (tablets), still maintain side-by-side layout in RTL */
@media (min-width: 769px) and (max-width: 991px) {
    html[dir="rtl"] .contact-section .row {
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: nowrap;
        gap: 30px;
        justify-content: center;
    }
    
    html[dir="rtl"] .contact-section .row > .col-lg-6 {
        flex: 1;
        max-width: 48%;
        width: 48%;
    }
}

/* RTL overrides for utilities used in the contact form so the spacing
   and border flip correctly when dir="rtl" is active. These mirror the
   original LTR-style classes without changing HTML markup. */
html[dir="rtl"] .border-right {
    border-right: none !important;
    border-left: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* .pr-5 represents right padding in the current markup; flip to left padding in RTL */
html[dir="rtl"] .pr-5 {
    padding-right: 0 !important;
    padding-left: 1.25rem !important; /* matches typical .pr-5 spacing */
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    padding: 80px 16px;
}

.cta-content {
    max-width: 750px;
    text-align: center;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 50px;
    font-weight: 700;
    line-height: 60px;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-content button {
    background: var(--button-gradient);
    color: var(--text-on-colored);
    border: none;
    box-shadow: 0 10px 24px rgba(238, 94, 69, 0.35);
}