/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* This is just the gradient */
    background: linear-gradient(135deg, #E9E1E5 0%, #E1D4DB 50%, #D9CCD2 100%);
    color: #5a4a52;
    line-height: 1.6;
    min-height: 100vh;
    
    /* ADDED: This is required for the ::before element to work */
    position: relative;
    /* ADDED: Ensures content stacks properly */
    z-index: 1; 
}
body::before {
    content: ""; /* Required to show the element */
    position: absolute; /* Positions it relative to the body */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* Your image */
    background-image: url(../images/watter_drops.png);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-blend-mode: multiply; /* Blends image with gradient */

    /* THE FIX: Fades *only* this layer */
    opacity: 0.05; 
    
    /* Puts this layer *behind* your page content */
    z-index: -1; 
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.aref-ruqaa-ink-regular {
  font-family: "Aref Ruqaa Ink", serif;
  font-weight: 400;
  font-style: normal;
}

/* Section Title styles */
.section-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #5a4a52;
    text-align: center;
    margin-bottom: 50px;
}

/* Header Elements (Contains icons and language selector) */
.header-elements {
    position: absolute;
    top: 40px;
    right: 15%;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
    /* ADDED: For blur transition */
    transition: filter 0.4s ease-out; 
}

/* Header Icons Group */
.header-icons {
    display: flex;
    gap: 15px;
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E1D4DB, #D9CCD2);
    color: #5a4a52;
    border: 2px solid rgba(90, 74, 82, 0.3);
    box-shadow: 0 8px 25px rgba(90, 74, 82, 0.2);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.icon-link:hover {
    background: linear-gradient(135deg, #D9CCD2, #D1C4CA);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(90, 74, 82, 0.3);
}

.icon {
    width: 28px;
    height: 28px;
    color: #5a4a52;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 8px;
}

.lang-link {
    display: block;
    padding: 8px 12px;
    background-color: rgba(90, 74, 82, 0.7);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-link:hover {
    background-color: rgba(90, 74, 82, 1);
}

.lang-link.active {
    background-color: #5a4a52;
    color: #E9E1E5;
}


/* Hero Section */
.hero {
    padding: 120px 20px 60px;
    text-align: left;
    position: relative;
    /* ADDED: For blur transition */
    transition: filter 0.4s ease-out; 
}

.welcome-text {
    font-size: 1.125rem;
    color: #5a4a52;
    margin-bottom: 10px;
    font-weight: 400;
}

.main-title {
    font-family: 'Great Vibes', cursive;
    font-size: 5.5rem;
    font-weight: 400;
    color: #5a4a52;
    margin-bottom: 20px;
}

/* Process Timeline Section */
.process {
    padding: 60px 20px;
    /* ADDED: For blur transition */
    transition: filter 0.4s ease-out; 
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Timeline: Connector Line */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #5a4a52;
    opacity: 0.3;
    z-index: 1;
}

/* Timeline: Individual Step */
.process-step {
    flex: 1;
    text-align: center;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* RTL Fix: Reverse the order of process steps */
body.rtl .process-timeline {
    flex-direction: row-reverse;
}

/* Timeline: Step Icon */
.process-step-icon {
    width: 20px;
    height: 20px;
    background-color: #5a4a52;
    border-radius: 50%;
    border: 4px solid #E1D4DB; 
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* Timeline: Step Text */
.process-step-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
}

.process-step-description {
    font-size: 0.95rem;
    line-height: 1.5;
}


/* --- Team Section (Single Item Slideshow with Fade, Dots, Hover) --- */
.team {
    padding: 60px 0;
    /* Section itself does not transition, only wrapper */
}

.slider-wrapper {
    position: relative;
    max-width: 100%; /* Use full width of container */
    margin: 0 auto;
    overflow: hidden; 
    
    /* Faint glow on the sides */
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);

    /* Transition for the hover-expand effect */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-slideshow-container {
    display: flex; /* Lays out the two inner wrappers side-by-side */
}

.team-slideshow-inner {
    display: flex;
    flex-shrink: 0; /* Prevents the inner wrappers from shrinking */
    animation: infinite-scroll-ltr 24s linear infinite;
}

.slide {
    display: flex; 
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0; /* Prevent slides from shrinking */
    width: 240px; /* Made 20% smaller */
    margin: 0 15px; /* Adjusted space between slides */
}

/* This styles the <img> tag directly */
.team-member-photo {
    width: 100%; /* Fill the slide width */
    aspect-ratio: 3 / 4; /* Maintain aspect ratio */
    object-fit: cover;
    background-color: #C9BCC2; /* Placeholder color */
    border-radius: 8px;
    margin-bottom: 15px; /* NEW: Add space below the image */
}

.slide-info {
    /* No margin needed here now */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem; /* UPDATED: Reduced by ~20% */
    font-weight: 700;
    color: #5a4a52;
    margin-bottom: 5px;
}

.member-title {
    font-size: 1.1rem;
    color: #5a4a52;
    opacity: 0.9;
    margin-bottom: 15px;
}
/* --- END OF TEAM SECTION STYLES --- */

/* --- NEW: Infinite Scroll Animation --- */
@keyframes infinite-scroll-ltr {
    from { transform: translateX(0%); }
    to { transform: translateX(-100%); } /* Moves one full container width */
}

@keyframes infinite-scroll-rtl {
    from { transform: translateX(0%); }
    to { transform: translateX(100%); }
}

/* Apply RTL animation if needed */
body.rtl .team-slideshow-inner {
    animation-name: infinite-scroll-rtl;
}



/* Pricing Section */
.pricing {
    padding: 80px 20px;
    /* ADDED: For blur transition */
    transition: filter 0.4s ease-out; 
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(90, 74, 82, 0.2);
    border-radius: 15px;
    padding: 40px 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(90, 74, 82, 0.3);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #5a4a52;
    margin-bottom: 15px;
}

.plan-original-price {
    font-size: 1.125rem;
    color: #5a4a52;
    text-decoration: line-through;
    opacity: 0.6;
}

.plan-price {
    font-size: 2.25rem;
    font-weight: 700;
    color: #5a4a52;
    margin-bottom: 30px;
}

.plan-features {
    list-style: none;
    margin-bottom: 35px;
    min-height: 100px;
}

.plan-features li {
    font-size: 1rem;
    color: #5a4a52;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.btn {
    width: 100%;
    padding: 16px 30px;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* ADDED: Ensure <a> tags behave like buttons */
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-purchase {
    background: linear-gradient(135deg, #E1D4DB, #D9CCD2);
    color: #5a4a52;
    border: 2px solid rgba(90, 74, 82, 0.3);
    box-shadow: 0 8px 25px rgba(90, 74, 82, 0.2);
    border-radius: 15px;
    /* ADDED: Remove underline from <a> tag */
    text-decoration: none; 
}

.btn-purchase:hover {
    background: linear-gradient(135deg, #D9CCD2, #D1C4CA);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(90, 74, 82, 0.3);
}

.btn-coming-soon {
    /* UPDATED: Darkened gradient */
    background: linear-gradient(135deg, #C1B4BA, #B9AEB2);
    color: #5a4a52;
    border: 2px solid rgba(90, 74, 82, 0.3);
    box-shadow: 0 8px 25px rgba(90, 74, 82, 0.2);
    opacity: 0.7;
    cursor: not-allowed;
    border-radius: 15px;
}

/* Footer */
.footer {
    padding: 30px 20px;
    text-align: center;
    background-color: transparent;
    /* ADDED: For blur transition */
    transition: filter 0.4s ease-out; 
}

.footer-text {
    font-size: 0.875rem;
    color: #4d3f46; /* Darkened for better readability */
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 968px) {
    .header-elements {
        top: 20px;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
    
    .main-title {
        font-size: 3rem;
    }

    .process-timeline {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .process-timeline::before {
        display: none;
    }
    .process-step {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .header-elements {
        top: 20px;
    }
    
    .icon-link {
        width: 45px;
        height: 45px;
    }
    
    .icon {
        width: 24px;
        height: 24px;
    }
    
    .hero {
        padding: 100px 20px 40px;
    }
    
    .main-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}

/* --- NEW: RTL (Right-to-Left) Styles --- */
/* This class is added to the <body> by script.js */
body.rtl {
    direction: rtl;
    font-family: 'Aref Ruqaa Ink', serif;
}

/* Fixes for RTL layout */
body.rtl .hero {
    text-align: right;
}

body.rtl .header-elements {
    right: auto;
    left: 15%;
}

/* RTL Fix: Align modal text to the right */
body.rtl .terms-container {
    text-align: right;
}

/* RTL Fix: Adjust padding for modal scrollbar */
body.rtl .scrollable-content {
    padding-left: 15px;
    padding-right: 0;
}
/* Use the fancy font for RTL titles */
body.rtl .main-title {
    /* This font is now inherited from the body, but we can override size/weight here */
    font-size: 4.8rem;
    font-weight: 400;
    font-style: normal;
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
}

/* --- NEW: Health & Safety Modal --- */
#health-safety-modal-overlay {
    /* display: none; This is handled inline and by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex; /* Changed from none to flex for JS to control visibility */
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#health-safety-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.terms-container {
    background: #2c2c2c;
    color: #f0f0f0;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    width: 80%;
    max-width: 80%;
    height: 40vh;
    min-height: 280px;
    text-align: left;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#health-safety-modal-overlay.is-visible .terms-container {
    transform: scale(1);
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #2c2c2c;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
    border: 2px solid #2c2c2c;
}

.terms-container h1 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.scrollable-content p {
    font-size: 0.72rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.button-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 150px;
    text-align: center;
    color: #ffffff;
}

/* NEW: Style for the disabled button state. */
.nav-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #333 !important; /* Use important to override hover styles */
    transform: none;
    box-shadow: none;
}

.nav-button.agree {
    background-color: #444;
    border-color: #666;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nav-button.agree:not(:disabled):hover {
    transform: translateY(-3px);
    background-color: #555;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nav-button.exit {
    background-color: #3e3e3e;
    border-color: #555;
}

.nav-button.exit:hover {
    background-color: #333;
    border-color: #444;
}

@media (max-width: 900px) {
    .terms-container {
        width: 95%;
        height: 50vh;
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .terms-container {
        width: 100%;
        height: 50vh;
        padding: 20px;
    }
    .terms-container h1 {
        font-size: 1.2rem;
    }
    .scrollable-content p {
        font-size: 0.7rem;
    }
    .nav-button {
        padding: 14px 28px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 200px;
    }
    .button-wrapper {
        gap: 10px;
    }
}

/* --- END: Health & Safety Modal --- */

/* --- NEW: Focus & Blur on JS-controlled class --- */

/* 1. Expand and focus the slider */
.slider-wrapper.is-expanded {
    transform: scale(1.15); /* Expand the slider */
    z-index: 20; /* Ensure it's on top of other content */
}

/* 2. Blur the background sections */
/* This selects the body ONLY when the slider has the .is-expanded class */
body:has(.slider-wrapper.is-expanded) .hero,
body:has(.slider-wrapper.is-expanded) .process,
body:has(.slider-wrapper.is-expanded) .pricing,
body:has(.slider-wrapper.is-expanded) .footer,
body:has(.slider-wrapper.is-expanded) .header-elements {
    filter: blur(5px);
    pointer-events: none; /* Prevent clicking blurred items */
}
