/*
 * Raqmana Theme: Homepage Specific Styles
 * This file contains styles for sections on the front page.
 */

/* =================================================================
   1. Hero Section
   ================================================================= */
.raqmana-hero,
.raqmana-portfolio {
  background-color: var(--black-color);
  color: var(--white-color);
  padding-block: 50px;
  position: relative;
  overflow: hidden;
  z-index: 0;
}


/* الجبال - طبقة بعيدة */
.raqmana-hero::before,
.raqmana-portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.07);
  clip-path: polygon(
    0% 85%, 20% 75%, 40% 70%, 
    50% 40%,   /* قمة عالية */
    60% 70%, 80% 75%, 100% 68%, 
    100% 100%, 0% 100%
  );
  z-index: 1;
  pointer-events: none;
  animation: moveFar 25s linear infinite alternate;
}


/* الجبال - طبقة متوسطة */
.raqmana-hero::after,
.raqmana-portfolio::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.12);
  clip-path: polygon(
    0% 80%, 10% 72%, 22% 75%, 35% 65%, 
    50% 68%, 65% 60%, 78% 70%, 90% 62%, 
    100% 75%, 100% 100%, 0% 100%
  );
  z-index: 2;
  pointer-events: none;
  animation: moveMid 20s linear infinite alternate;
}


/* الجبال - طبقة قريبة */
.raqmana-hero .mountain-front,
.raqmana-portfolio .portfolio-mountain-front {
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.18);
  clip-path: polygon(
    0% 90%, 18% 82%, 35% 86%, 52% 78%, 
    70% 85%, 85% 75%, 100% 88%, 
    100% 100%, 0% 100%
  );
  z-index: 3;
  pointer-events: none;
  animation: moveFront 15s linear infinite alternate;
}


/* خطوط أسفل السكشن */
.raqmana-hero .background-lines,
.raqmana-portfolio .portfolio-background-lines {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: repeating-linear-gradient(
    to top,
    rgba(0, 255, 0, 0.08) 0px,
    rgba(0, 255, 0, 0.08) 2px,
    transparent 2px,
    transparent 12px
  );
  z-index: 2;
  animation: linesMove 8s linear infinite;
  pointer-events: none;
}


/* الكونتنت */
.raqmana-hero .raqmana-container,
.raqmana-portfolio .raqmana-container > * {
  position: relative;
  z-index: 5;
}

/* أنيميشن */
@keyframes moveFar {
  from { transform: translateY(0); }
  to { transform: translateY(5px); }
}

@keyframes moveMid {
  from { transform: translateY(0); }
  to { transform: translateY(10px); }
}

@keyframes moveFront {
  from { transform: translateY(0); }
  to { transform: translateY(15px); }
}

@keyframes linesMove {
  from { background-position: 0 0; }
  to { background-position: 0 -20px; }
}



/* Grid Layout */
.raqmana-hero .raqmana-container {
    position: relative;
    z-index: 2;
}

.raqmana-hero__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 40px;
}

/* -- Column 1: Content -- */
.raqmana-hero__title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.3;
    margin-block: 0 20px;
}

.raqmana-hero__description {
    font-size: 18px;
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 30px;
    color: var(--description-color);
}

.raqmana-hero__buttons {
    display: flex;
    gap: 15px;
}

/* -- Column 2: Visuals (Final Adjustments) -- */
.raqmana-hero__image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3; 

}

/* UPDATED: Person image is now aligned to the bottom */
.raqmana-hero__person-img {
    position: absolute;
    bottom: 0; /* Align to the bottom of the container */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Fine-tune horizontal centering */
    max-width: 80%;
    max-height: 90%; /* Allow it to be a bit taller */
    object-fit: contain;
    z-index: 3; /* Above the cards, but below the chart */
}

/* The big background shape */
.raqmana-hero__image-bg-shape {
    position: absolute;
    width: 100%;
    height: 65%; 
    inset-block-end: 0;
    inset-inline-start: 0;
    background-color: #F1FFEC;
    border-radius: 20px;
    z-index: 1; /* The very bottom layer */
}

/* The small cards */
.raqmana-hero__card {
    position: absolute;
    width: 48%;
    height: 33%;
    background-color: rgba(45, 57, 64, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
  /*  padding: 15px 20px;*/
    z-index: 2; /* Above the background, but below the person */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Position the top-right card */
.raqmana-hero__card--reviews {
    inset-block-start: 0;
    inset-inline-end: 0;
}

/* Position the top-left card */
.raqmana-hero__card--visitors {
    inset-block-start: 0;
    inset-inline-start: 0;
    background-color: var(--primary-color);
    color: var(--text-color);
}

.raqmana-hero__card--visitors .card-title {
    color: var(--text-color);
    opacity: 0.8;
}

/* UPDATED: The chart is back to a small floater ON TOP of the person */
.raqmana-hero__chart-floater {
    position: absolute;
    width: 120px; /* Back to a small fixed width */
    bottom: 100px; /* Position it floating over the image */
    inset-inline-end: 350px; /* Position it floating over the image */
    z-index: 4; /* Highest z-index to be on top of everything */
    background-color: transparent;
    height: auto;
    padding: 0;

    /* الحركة */
    animation: floatY 5s ease-in-out infinite;
}

/* حركة لأعلى ولأسفل */
@keyframes floatY {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px); /* اطلع فوق */
    }
    100% {
        transform: translateY(0); /* ارجع مكانك */
    }
}

/* =================================================================
   2. Hero Section (Responsive)
   ================================================================= */
@media (max-width: 992px) {
    .raqmana-hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .raqmana-hero__content {
        order: 2;
        padding: 20px;
    }

    .raqmana-hero__image-wrapper {
        order: 1;
        margin-bottom: 40px;
    }

    .raqmana-hero__description {
        margin-inline: auto;
    }

    .raqmana-hero__buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .raqmana-hero__title {
        font-size: 32px;
    }

    /* On small screens, hide the complex floaters to avoid clutter */
    .raqmana-hero__chart-floater{
        bottom: 50px;
        width: 100px;
        inset-inline-end: 250px;
    }
}

/* =================================================================
   3. Button Styles (Hero Section)
   ================================================================= */

/* Base Button Style */
.raqmana-button {
    padding: 12px 15px 12px 30px; /* Add more padding on the left for text */
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border: 2px solid transparent; /* Prepare for border on hover */
    transition: all 0.3s ease;
}

/* Primary Button (Green) */
.raqmana-button--primary {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

/* Outline/Dark Button */
.raqmana-button--outline {
    background-color: #2D3940; /* Using the dark text color */
    color: var(--white-color);
    border-color: #2D3940;
}

/* --- Hover Effects (Color Swap) --- */

/* On hover, primary button gets outline styles */
.raqmana-button--primary:hover {
    background-color: #2D3940;
    color: var(--white-color);
    border-color: #2D3940;
}

/* On hover, outline button gets primary styles */
.raqmana-button--outline:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}


/* --- Icon Styling --- */
.raqmana-button__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Arrow inside the icon (created with CSS) */
.raqmana-button__icon::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-top: 2px solid;
    border-right: 2px solid;
    transform: rotate(45deg);
    position: relative;
    left: -1px; /* Fine-tune arrow position */
}

/* Icon colors for Primary Button */
.raqmana-button--primary .raqmana-button__icon {
    background-color: var(--text-color);
    color: var(--primary-color);
}

/* Icon colors for Outline Button */
.raqmana-button--outline .raqmana-button__icon {
    border: 1px solid var(--white-color);
    background-color: transparent;
    color: var(--white-color);
}

/* --- Icon Hover Effects --- */

.raqmana-button--primary:hover .raqmana-button__icon {
    border: 1px solid var(--white-color);
    background-color: transparent;
    color: var(--white-color);
}

.raqmana-button--outline:hover .raqmana-button__icon {
    background-color: var(--text-color);
    color: var(--primary-color);
    border: none;
}
/* =================================================================
   4. Features Section
   ================================================================= */
.raqmana-features {
    padding-block: 30px;
    text-align: center;
    background-color: #fcfcfc; /* Or var(--white-color) if you prefer */
}

/* =================================================================
   Corrected Title Styles (for all sections)
   ================================================================= */

.section-title-wrapper {
    position: relative; /* Establishes positioning context */
    display: block;
    text-align: center;
    /* Give it height so it doesn't collapse */
    min-height: 100px; 
    margin-bottom: 20px;
}

.section-title-background {
    /* UPDATED: Make it absolute to center it properly */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; /* Set it to the back layer */

    font-size: clamp(32px, 8vw, 80px); 
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.1;
    text-transform: uppercase;
    white-space: nowrap; /* Prevent the title from wrapping to a new line */
}

.section-title-foreground {
    /* UPDATED: Ensure it's positioned correctly on top */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Set it to the front layer */

    font-size: 40px;
    white-space: nowrap;
    color: var(--text-color);
}

.section-subtitle {
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 50px;
    color: var(--description-color);
    font-size: 18px;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-card {
    background-color: var(--white-color);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: var(--text-color);
}

.feature-card__image {
    max-height: 80px;
    margin-bottom: 25px;
}

.feature-card__title {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* Responsive for Features Section */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title-foreground {
        font-size: 30px;
    }
}

/* =================================================================
   5. Why Us Section
   ================================================================= */
.raqmana-why-us {
    padding-block: 80px;
}

.raqmana-why-us .section-title-wrapper {
    text-align: center;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}

.why-us-grid__image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.why-us-grid__item--content {
    text-align: right; /* Text align for Arabic */
        background-color: var(--white-color);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.why-us-grid__item--content:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: var(--text-color);
}

html[dir="ltr"] .why-us-grid__item--content {
    text-align: left; /* Text align for English */
}

.why-us-grid__item--content h3 {
    font-size: 28px;
    color: var(--text-color);
    margin-block: 0 15px;
}

.why-us-grid__item--content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--description-color);
    margin-bottom: 30px;
}

/* Responsive for Why Us Section */
@media (max-width: 992px) {
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    .why-us-grid__item {
        max-width: 500px;
        margin-inline: auto; /* Center items when stacked */
    }
}

/* =================================================================
   6. Services Section
   ================================================================= */
.raqmana-services {
    padding-block: 80px;
    background-color: #fcfcfc;
}

.raqmana-services .section-title-wrapper {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-card__image {
    max-height: 70px;
    margin-bottom: 25px;
    align-self: flex-start;
}

.service-card__title {
    font-size: 20px;
    color: var(--text-color);
    margin-block: 0 15px;
    text-align: right;
}

.service-card__description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--description-color);
    margin-bottom: 30px;
    flex-grow: 1; /* Pushes the link to the bottom */
    text-align: right;
}

.service-card__link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.service-card__link:hover {
    color: var(--primary-color);
}

.service-card__link::after {
    content: ' →'; /* Arrow for LTR */
}

/* RTL and LTR specific styles */
html[dir="ltr"] .service-card__image,
html[dir="ltr"] .service-card__link {
    align-self: flex-start;
}

html[dir="rtl"] .service-card__image,
html[dir="rtl"] .service-card__link {
    align-self: flex-end;
}

html[dir="ltr"] .service-card__title,
html[dir="ltr"] .service-card__description {
    text-align: left;
}

html[dir="rtl"] .service-card__title,
html[dir="rtl"] .service-card__description {
    text-align: right;
}

html[dir="rtl"] .service-card__link::after {
    content: ' ←'; /* Arrow for RTL */
}

/* Responsive for Services Section */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   9. Portfolio Section
   ================================================================= */
/* =================================================================
   9. Portfolio Section (New Tabbed Layout)
   ================================================================= */
/* =================================================================
   9. Portfolio Section (Tabbed Layout)
   ================================================================= */
.raqmana-portfolio {
    padding-block: 80px;
    background-color: var(--black-color);
}

.portfolio-top-title {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--white-color);
}

.raqmana-portfolio__tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.raqmana-portfolio__tab {
    background-color: var(--text-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border: 2px solid var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.raqmana-portfolio__tab.active,
.raqmana-portfolio__tab:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color);
}

.raqmana-portfolio__content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.raqmana-portfolio__side {
    flex: 1 1 300px;
    padding: 20px;
}

.raqmana-portfolio__side h2 {
    margin-top: 0;
    font-size: 32px;
    color: var(--primary-color);
}
.raqmana-portfolio__side p {
    color: var(--description-color);
    line-height: 1.7;
    margin-bottom: 30px;
}
.raqmana-portfolio__side .raqmana-button {
    align-self: flex-start;
}
html[dir="rtl"] .raqmana-portfolio__side .raqmana-button {
    align-self: flex-end;
}

.raqmana-portfolio__slider {
    flex: 2 1 500px;
}

.portfolio-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    background-color: var(--white-color); /* Added for transparent images */
}

.portfolio-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-thumbnails .thumbnail {
    width: 120px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.portfolio-thumbnails .thumbnail.active {
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .raqmana-portfolio__content {
        flex-direction: column;
    }
}

/*
 * Raqmana Theme: Homepage Specific Styles
 * This file contains styles for sections on the front page.
 */

/* =================================================================
   1. Hero Section
   ================================================================= */
.raqmana-hero,
.raqmana-portfolio {
  background-color: var(--black-color);
  color: var(--white-color);
  padding-block: 50px;
  position: relative;
  overflow: hidden;
  z-index: 0;
}


/* الجبال - طبقة بعيدة */
.raqmana-hero::before,
.raqmana-portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.07);
  clip-path: polygon(
    0% 85%, 20% 75%, 40% 70%, 
    50% 40%,   /* قمة عالية */
    60% 70%, 80% 75%, 100% 68%, 
    100% 100%, 0% 100%
  );
  z-index: 1;
  pointer-events: none;
  animation: moveFar 25s linear infinite alternate;
}


/* الجبال - طبقة متوسطة */
.raqmana-hero::after,
.raqmana-portfolio::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.12);
  clip-path: polygon(
    0% 80%, 10% 72%, 22% 75%, 35% 65%, 
    50% 68%, 65% 60%, 78% 70%, 90% 62%, 
    100% 75%, 100% 100%, 0% 100%
  );
  z-index: 2;
  pointer-events: none;
  animation: moveMid 20s linear infinite alternate;
}


/* الجبال - طبقة قريبة */
.raqmana-hero .mountain-front,
.raqmana-portfolio .portfolio-mountain-front {
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 0, 0.18);
  clip-path: polygon(
    0% 90%, 18% 82%, 35% 86%, 52% 78%, 
    70% 85%, 85% 75%, 100% 88%, 
    100% 100%, 0% 100%
  );
  z-index: 3;
  pointer-events: none;
  animation: moveFront 15s linear infinite alternate;
}


/* خطوط أسفل السكشن */
.raqmana-hero .background-lines,
.raqmana-portfolio .portfolio-background-lines {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: repeating-linear-gradient(
    to top,
    rgba(0, 255, 0, 0.08) 0px,
    rgba(0, 255, 0, 0.08) 2px,
    transparent 2px,
    transparent 12px
  );
  z-index: 2;
  animation: linesMove 8s linear infinite;
  pointer-events: none;
}


/* الكونتنت */
.raqmana-hero .raqmana-container,
.raqmana-portfolio .raqmana-container > * {
  position: relative;
  z-index: 5;
}

/* أنيميشن */
@keyframes moveFar {
  from { transform: translateY(0); }
  to { transform: translateY(5px); }
}

@keyframes moveMid {
  from { transform: translateY(0); }
  to { transform: translateY(10px); }
}

@keyframes moveFront {
  from { transform: translateY(0); }
  to { transform: translateY(15px); }
}

@keyframes linesMove {
  from { background-position: 0 0; }
  to { background-position: 0 -20px; }
}



/* Grid Layout */
.raqmana-hero .raqmana-container {
    position: relative;
    z-index: 2;
}

.raqmana-hero__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 40px;
}

/* -- Column 1: Content -- */
.raqmana-hero__title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.3;
    margin-block: 0 20px;
}

.raqmana-hero__description {
    font-size: 18px;
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 30px;
    color: var(--description-color);
}

.raqmana-hero__buttons {
    display: flex;
    gap: 15px;
}

/* -- Column 2: Visuals (Final Adjustments) -- */
.raqmana-hero__image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3; 

}

/* UPDATED: Person image is now aligned to the bottom */
.raqmana-hero__person-img {
    position: absolute;
    bottom: 0; /* Align to the bottom of the container */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Fine-tune horizontal centering */
    max-width: 80%;
    max-height: 90%; /* Allow it to be a bit taller */
    object-fit: contain;
    z-index: 3; /* Above the cards, but below the chart */
}

/* The big background shape */
.raqmana-hero__image-bg-shape {
    position: absolute;
    width: 100%;
    height: 65%; 
    inset-block-end: 0;
    inset-inline-start: 0;
    background-color: #F1FFEC;
    border-radius: 20px;
    z-index: 1; /* The very bottom layer */
}

/* The small cards */
.raqmana-hero__card {
    position: absolute;
    width: 48%;
    height: 33%;
    background-color: rgba(45, 57, 64, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
  /*  padding: 15px 20px;*/
    z-index: 2; /* Above the background, but below the person */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Position the top-right card */
.raqmana-hero__card--reviews {
    inset-block-start: 0;
    inset-inline-end: 0;
}

/* Position the top-left card */
.raqmana-hero__card--visitors {
    inset-block-start: 0;
    inset-inline-start: 0;
    background-color: var(--primary-color);
    color: var(--text-color);
}

.raqmana-hero__card--visitors .card-title {
    color: var(--text-color);
    opacity: 0.8;
}

/* UPDATED: The chart is back to a small floater ON TOP of the person */
.raqmana-hero__chart-floater {
    position: absolute;
    width: 120px; /* Back to a small fixed width */
    bottom: 100px; /* Position it floating over the image */
    inset-inline-end: 350px; /* Position it floating over the image */
    z-index: 4; /* Highest z-index to be on top of everything */
    background-color: transparent;
    height: auto;
    padding: 0;

    /* الحركة */
    animation: floatY 5s ease-in-out infinite;
}

/* حركة لأعلى ولأسفل */
@keyframes floatY {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px); /* اطلع فوق */
    }
    100% {
        transform: translateY(0); /* ارجع مكانك */
    }
}

/* =================================================================
   2. Hero Section (Responsive)
   ================================================================= */
@media (max-width: 992px) {
    .raqmana-hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .raqmana-hero__content {
        order: 2;
        padding: 20px;
    }

    .raqmana-hero__image-wrapper {
        order: 1;
        margin-bottom: 40px;
    }

    .raqmana-hero__description {
        margin-inline: auto;
    }

    .raqmana-hero__buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .raqmana-hero__title {
        font-size: 32px;
    }

    /* On small screens, hide the complex floaters to avoid clutter */
    .raqmana-hero__chart-floater{
        bottom: 50px;
        width: 100px;
        inset-inline-end: 250px;
    }
}

/* =================================================================
   3. Button Styles (Hero Section)
   ================================================================= */

/* Base Button Style */
.raqmana-button {
    padding: 12px 15px 12px 30px; /* Add more padding on the left for text */
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border: 2px solid transparent; /* Prepare for border on hover */
    transition: all 0.3s ease;
}

/* Primary Button (Green) */
.raqmana-button--primary {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

/* Outline/Dark Button */
.raqmana-button--outline {
    background-color: #2D3940; /* Using the dark text color */
    color: var(--white-color);
    border-color: #2D3940;
}

/* --- Hover Effects (Color Swap) --- */

/* On hover, primary button gets outline styles */
.raqmana-button--primary:hover {
    background-color: #2D3940;
    color: var(--white-color);
    border-color: #2D3940;
}

/* On hover, outline button gets primary styles */
.raqmana-button--outline:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}


/* --- Icon Styling --- */
.raqmana-button__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Arrow inside the icon (created with CSS) */
.raqmana-button__icon::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-top: 2px solid;
    border-right: 2px solid;
    transform: rotate(45deg);
    position: relative;
    left: -1px; /* Fine-tune arrow position */
}

/* Icon colors for Primary Button */
.raqmana-button--primary .raqmana-button__icon {
    background-color: var(--text-color);
    color: var(--primary-color);
}

/* Icon colors for Outline Button */
.raqmana-button--outline .raqmana-button__icon {
    border: 1px solid var(--white-color);
    background-color: transparent;
    color: var(--white-color);
}

/* --- Icon Hover Effects --- */

.raqmana-button--primary:hover .raqmana-button__icon {
    border: 1px solid var(--white-color);
    background-color: transparent;
    color: var(--white-color);
}

.raqmana-button--outline:hover .raqmana-button__icon {
    background-color: var(--text-color);
    color: var(--primary-color);
    border: none;
}
/* =================================================================
   4. Features Section
   ================================================================= */
.raqmana-features {
    padding-block: 30px;
    text-align: center;
    background-color: #fcfcfc; /* Or var(--white-color) if you prefer */
}

/* =================================================================
   Corrected Title Styles (for all sections)
   ================================================================= */

.section-title-wrapper {
    position: relative; /* Establishes positioning context */
    display: block;
    text-align: center;
    /* Give it height so it doesn't collapse */
    min-height: 100px; 
    margin-bottom: 20px;
}

.section-title-background {
    /* UPDATED: Make it absolute to center it properly */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1; /* Set it to the back layer */

    font-size: clamp(32px, 8vw, 80px); 
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.1;
    text-transform: uppercase;
    white-space: nowrap; /* Prevent the title from wrapping to a new line */
}

.section-title-foreground {
    /* UPDATED: Ensure it's positioned correctly on top */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Set it to the front layer */

    font-size: 40px;
    white-space: nowrap;
    color: var(--text-color);
}

.section-subtitle {
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: 50px;
    color: var(--description-color);
    font-size: 18px;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-card {
    background-color: var(--white-color);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: var(--text-color);
}

.feature-card__image {
    max-height: 80px;
    margin-bottom: 25px;
}

.feature-card__title {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* Responsive for Features Section */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title-foreground {
        font-size: 30px;
    }
}

/* =================================================================
   5. Why Us Section
   ================================================================= */
.raqmana-why-us {
    padding-block: 80px;
}

.raqmana-why-us .section-title-wrapper {
    text-align: center;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}

.why-us-grid__image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.why-us-grid__item--content {
    text-align: right; /* Text align for Arabic */
        background-color: var(--white-color);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.why-us-grid__item--content:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: var(--text-color);
}

html[dir="ltr"] .why-us-grid__item--content {
    text-align: left; /* Text align for English */
}

.why-us-grid__item--content h3 {
    font-size: 28px;
    color: var(--text-color);
    margin-block: 0 15px;
}

.why-us-grid__item--content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--description-color);
    margin-bottom: 30px;
}

/* Responsive for Why Us Section */
@media (max-width: 992px) {
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    .why-us-grid__item {
        max-width: 500px;
        margin-inline: auto; /* Center items when stacked */
    }
}

/* =================================================================
   6. Services Section
   ================================================================= */
.raqmana-services {
    padding-block: 80px;
    background-color: #fcfcfc;
}

.raqmana-services .section-title-wrapper {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-card__image {
    max-height: 70px;
    margin-bottom: 25px;
    align-self: flex-start;
}

.service-card__title {
    font-size: 20px;
    color: var(--text-color);
    margin-block: 0 15px;
    text-align: right;
}

.service-card__description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--description-color);
    margin-bottom: 30px;
    flex-grow: 1; /* Pushes the link to the bottom */
    text-align: right;
}

.service-card__link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.service-card__link:hover {
    color: var(--primary-color);
}

.service-card__link::after {
    content: ' →'; /* Arrow for LTR */
}

/* RTL and LTR specific styles */
html[dir="ltr"] .service-card__image,
html[dir="ltr"] .service-card__link {
    align-self: flex-start;
}

html[dir="rtl"] .service-card__image,
html[dir="rtl"] .service-card__link {
    align-self: flex-end;
}

html[dir="ltr"] .service-card__title,
html[dir="ltr"] .service-card__description {
    text-align: left;
}

html[dir="rtl"] .service-card__title,
html[dir="rtl"] .service-card__description {
    text-align: right;
}

html[dir="rtl"] .service-card__link::after {
    content: ' ←'; /* Arrow for RTL */
}

/* Responsive for Services Section */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   9. Portfolio Section
   ================================================================= */
/* =================================================================
   9. Portfolio Section (New Tabbed Layout)
   ================================================================= */
/* =================================================================
   9. Portfolio Section (Tabbed Layout)
   ================================================================= */
.raqmana-portfolio {
    padding-block: 80px;
    background-color: var(--black-color);
}

.portfolio-top-title {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--white-color);
}

.raqmana-portfolio__tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.raqmana-portfolio__tab {
    background-color: var(--text-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border: 2px solid var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.raqmana-portfolio__tab.active,
.raqmana-portfolio__tab:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color);
}

.raqmana-portfolio__content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.raqmana-portfolio__side {
    flex: 1 1 300px;
    padding: 20px;
}

.raqmana-portfolio__side h2 {
    margin-top: 0;
    font-size: 32px;
    color: var(--primary-color);
}
.raqmana-portfolio__side p {
    color: var(--description-color);
    line-height: 1.7;
    margin-bottom: 30px;
}
.raqmana-portfolio__side .raqmana-button {
    align-self: flex-start;
}
html[dir="rtl"] .raqmana-portfolio__side .raqmana-button {
    align-self: flex-end;
}

.raqmana-portfolio__slider {
    flex: 2 1 500px;
}

.portfolio-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    background-color: var(--white-color); /* Added for transparent images */
}

.portfolio-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-thumbnails .thumbnail {
    width: 120px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.portfolio-thumbnails .thumbnail.active {
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .raqmana-portfolio__content {
        flex-direction: column;
    }
}

/* =================================================================
   10. Testimonials Section
   ================================================================= */
/* =================================================================
   10. Testimonials Section (New Design)
   ================================================================= */
.raqmana-testimonials {
    padding-block: 80px;
    background-color: #fcfcfc;
}

.testimonials-wrapper {
    position: relative;
    min-height: 300px;
    margin-top: 80px; /* Increased margin to make space for the author image */
}

/* The container for one testimonial, now used for positioning */
.testimonial-item {
    display: none;
    position: relative;
}
.testimonial-item.active {
    display: block; /* We don't need grid here anymore */
}

/* The author block (image + name), now positioned on top */
.testimonial-author {
    position: absolute;
    top: -50px; /* Pulls the author block up */
    right: 40px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 20px;
}
html[dir="ltr"] .testimonial-author {
    right: auto;
    left: 40px;
}

/* Find this block in your homepage.css */

/* Find this block in your homepage.css */

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* --- REPLACE the old .author-info rule with THIS --- */
.author-info {
    display: flex;
    flex-direction: column; /* نجعل العناصر مرصوصة بشكل عمودي */
    align-items: center;   /* نقوم بتوسيطها أفقيًا */
    justify-content: center; /* ونقوم بتوسيطها عموديًا أيضًا */
}

.author-name {
    margin: 0 0 5px 0;
    font-size: 22px;
    color: var(--text-color);
    font-weight: bold;
}

.author-position {
    margin: 0;
    color: var(--description-color);
}

/* The main speech bubble */
.testimonial-bubble {
    background-color: var(--white-color);
    border: 5px solid var(--primary-color);
    color: var(--description-color);
    padding: 40px;
    border-radius: 40px;
    position: relative;
    line-height: 1.8;
    box-shadow: 0 15px 40px rgba(0,0,0,0.07);
    min-height: 150px;

    /* --- أضف هذه الأسطر للتوسيط --- */
    display: flex;
    align-items: center; /* توسيط عمودي */
    justify-content: center; /* توسيط أفقي */
    text-align: center; /* توسيط النص نفسه */
}

/* The new bubble tail (made of two pseudo-elements) */
.testimonial-bubble::before,
.testimonial-bubble::after {
    content: '';
    position: absolute;
    background-color: var(--primary-color);
}
.testimonial-bubble::before {
    width: 60px;
    height: 40px;
    bottom: -44px;
    left: 80px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.testimonial-bubble::after {
    width: 120px;
    height: 60px;
    bottom: -60px; /* Position it lower */
    left: 110px;  /* Position it to the right */
    clip-path: polygon(0 0, 0 100%, 100% 0);
}

/* The new quotes icon */
.testimonial-quotes {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 100px;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-color);
}

/* Responsive for Testimonials */
@media (max-width: 768px) {
    .testimonial-author {
        position: static; /* Un-stick the author on mobile */
        margin-bottom: 20px;
        top: auto;
        right: auto;
    }
    .testimonials-wrapper {
        margin-top: 20px;
    }
    .testimonial-bubble::before,
    .testimonial-bubble::after {
        left: 40px; /* Adjust tail position for mobile */
    }
}

/* =================================================================
   11. Blog Section
   ================================================================= */
.raqmana-blog {
    padding-block: 80px;
    background-color: var(--background-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background-color: var(--white-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* To make sure the image corners are rounded */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.blog-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* This makes the content area fill the space */
    text-align: right;
}

.blog-card__meta .card-category {
    background-color: #F1FFEC;
    color: var(--text-color);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
}

.blog-card__title {
    margin-block: 15px;
    font-size: 20px;
}

.blog-card__title a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card__title a:hover {
    color: var(--primary-color);
}

.blog-card__excerpt {
    color: var(--description-color);
    font-size: 15px;
    line-height: 1.7;
    flex-grow: 1; /* Pushes the link to the bottom */
}

.blog-card__link {
    margin-top: 20px;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start; /* Aligns the button to the left in LTR */
    transition: all 0.3s ease;
}
html[dir="rtl"] .blog-card__content {
    text-align: right;
}

html[dir="rtl"] .blog-card__link {
    align-self: flex-end; /* Aligns the button to the right in RTL */
}


.blog-card__link .arrow-icon {
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
    transform: rotate(45deg); /* Arrow points right for LTR */
    transition: border-color 0.3s ease;
}

html[dir="rtl"] .blog-card__link .arrow-icon {
     transform: rotate(-135deg); /* Arrow points left for RTL */
}

.blog-card__link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.blog-card__link:hover .arrow-icon {
    border-color: var(--text-color);
}


/* Responsive Styles for Blog Section */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}
/* =================================================================
   12. Contact Us Section (Corrected for Contact Form 7)
   ================================================================= */

/* This targets the main wrapper and removes default margins */
.wpcf7 {
    padding: 0;
}

/* This resets the <p> tags that CF7 adds automatically */
.wpcf7-form p {
    margin: 0;
    padding: 0;
}

.wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 25px; /* Space between fields */
    width: 100%;
}

/* Make specific fields span the full width */
.wpcf7-form .full-width {
    grid-column: 1 / -1; /* This makes the element take the full width */
}

/* Style for the labels of the fields */
.wpcf7-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--description-color);
    font-size: 15px;
    text-align: right;
}
html[dir="ltr"] .wpcf7-form label {
    text-align: left;
}

/* General style for all input fields and the textarea */
.wpcf7-form input:not([type="submit"]),
.wpcf7-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #F1FFEC;
    border-radius: 50px;
    background-color: #F8FFF0;
    font-size: 16px;
    color: var(--text-color);
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Important for consistent sizing */
}

.wpcf7-form textarea {
    border-radius: 20px;
    min-height: 150px;
    resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Style for the submit button */
.wpcf7-form .wpcf7-submit {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 15px 40px;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
}

.wpcf7-form .wpcf7-submit:hover {
    background-color: var(--text-color);
    border-color: var(--text-color);
    color: var(--white-color);
}
